<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>运单管理</title>
    <link href="__PUBLIC__/css/admin/reset.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/css/admin/zh-cn-system.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/css/admin/table_form.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles1.css" title="styles1" media="screen">
    <link rel="alternate stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles2.css" title="styles2" media="screen">
    <link rel="alternate stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles3.css" title="styles3" media="screen">
    <link rel="alternate stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles4.css" title="styles4" media="screen">
    <script type="text/javascript" src="__PUBLIC__/js/admin/jquery.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/admin/jquery.cookie.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/admin/styleswitch.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/admin/admin_common.js"></script>
</head>
<style type="text/css">
    html{
        _overflow-y:scroll
    }
    #search{
        margin: 20px;
    }
    #ord{

        margin: 20px;
        margin-left: 20px;
    }
    table{
        width:100%;
        margin: auto;
        text-align: center;
        background: #fff;
    }
    th{
        background:rgb(18,162,225);
        color: #fff;
        border:solid 1px #fff;
    }
    td{
        background: #ccc;
        border:solid 1px #fff;
    }
</style>
<body>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
        <p>运单列表</p>
    </div>
</div>


<div class="pad-lr-10 table-list">
    <div id="search">
        运单号：<input type="search" name="way" value=""/>
        时间：<input type="search" name="ord_time" value="" />
        <input type="submit" name="submit" value="搜索"/>
    </div>

    <form name="myform" id="myform" action="" method="post">
        <div id="ord">
            <table cellspacing="1">
                <tr>
                    <th>下单时间</th>
                    <th>渠道</th>
                    <th>运单号</th>
                    <th>内单号</th><!--添加-->
                    <th>国际单号</th>
                    <th>目的国</th>
                    <th>品名</th>
                    <th>包裹件数</th>
                    <th>计费重量(kg)</th>
                    <th>体积</th><!--添加-->
                    <th>结算费用(￥)</th>
                    <th>是否付款</th>状态
                    <th>备注</th><!--添加-->
                    <th>用户名</th>
                    <th>实收费用</th><!---->
                    <th>欠费用</th><!---->
                    <th>服务商</th><!---->
                    <th>交货渠道</th><!---->
                    <th>交货金额</th><!---->
                    <th>交货实重</th><!---->
                    <th>订单状态</th><!---->
                    <th>操作</th>
                </tr>
                <foreach name="data" item="value">
                    <tr>
                        <td><!--{$value['ord_time']}--></td>
                        <td><!--{$value['company']}--></td>
                        <td><!--{$value['way']}--></td>
                        <td><!--{$value['inside_no']}--></td>
                        <if condition="$value['transit'] == false">
                            <td>未转运</td>
                            <else/>
                            <td><!--{$value['transit']}--></td>
                        </if>
                        <td><!--{$value['cname']}-->&nbsp;&nbsp;<!--{$value['ename']}--></td>
                        <td><!--{$value['g_cname']}--></td>
                        <td><!--{$value['piece_num']}--></td>
                        <td><!--{$value['weight']}--></td>
                        <td><!--{$value['volume']}--></td>
                        <td><!--{$value['money']}--></td>
                        <if condition="$value['ord_status']==0">
                            <td><span>未付款&nbsp;&nbsp;</span> <a href="javascript:;void(0);" onclick="queren(<!--{$value['order_id']}-->);" class="fb button blue " > 确认付款</a></td>
                            <else />
                            <td>已付款</td>
                        </if>
                        <td><!--{$value['remarks']}--></td>
                        <td><!--{$value['account']}--></td>
                        <td><!--{$value['charge']}--></td>
                        <td><!--{$value['due_expense']}--></td>
                        <td><!--{$value['facilitator']}--></td>
                        <td><!--{$value['delivery_channel']}--></td>
                        <td><!--{$value['delivery_value']}--></td>
                        <td><!--{$value['delivery_weight']}--></td>
                        <td><!--{$value['statu']}--></td>
                        <td>
                            <if condition="$value['ord_status']==1">
                                <a href="javascript:void(0);" style="text-decoration:line-through" title="已付款不能修改">修改</a> |
                                <a href="javascript:void(0);" style="text-decoration:line-through;" title="已付款不能取消">取消</a>
                                <else/>
                                <a href="__MODULE__/Order/edit/nid/<!--{$value['order_id']}-->">修改</a> |
                                <a onclick="return ConfirmDel();" href="__MODULE__/Order/del/nid/<!--{$value['order_id']}-->">取消</a>
                            </if>
                        </td>
                    </tr>
                </foreach>
                <tr>
                    <td colspan="22"><!--{$page}--></td>
                </tr>
            </table>
        </div>
    </form>
</div>

<script type="text/javascript">
    function queren(t){

        if(confirm("确认已付款吗")){

            $.getJSON("__MODULE__/Order/affirm",{ord_status:1,nid:t},function(msg){
                if(msg){
                    document.location.href="__MODULE__/Order";
                }else{
                    alert("确认失败");
                }
            })
        }

    }
</script>

</body>
</html>


